<script>
export default {
  name: "sonPage",
  props:{
    //定义数据类型
    //giveSon:String
    //设置多种类型

    giveSon1: {
      type: [String,Number,Array],
      default:()=>[5,6,7]
    },
    giveSon:{
      type:[String,Number],
      default:'这是giveSon的默认值'
      // default:[5,6,7],
    },
  },
  created() {
    console.log(this.giveSon,'giveSon');
    console.log(this.giveSon,'giveSon1');
  }
}
</script>

<template>
<div>
  子组件
  {{giveSon}}
</div>
</template>

<style scoped lang="less">

</style>